﻿using UnityEngine;
using System.Collections;
using System;
using UnityEngine.UI;


public class TimeFormat : MonoBehaviour
{
    public Text timeTxt;
    private int a = -4;

    // Use this for initialization
    void Start()
    {
        InvokeRepeating("ShowTime",0,1);
        Debug.Log(a);
        Debug.Log((uint)a);//4294967292 转圈了
        Debug.Log(uint.MinValue); //0
        Debug.Log(uint.MaxValue); //4294967295
    }

    void ShowTime()
    {
        DateTime dt = System.DateTime.Now;
        string time = string.Format("{0:D2}:{1:D2}:{2:D2}", dt.Hour, dt.Minute, dt.Second);
        timeTxt.text = time;
    }

}
